/*
 * 
 * Copyright ? 2006 Shanghai je01 Co. Ltd.
 * All right reserved
 * 
 * @author Ray
 * Created on 2006-5-25
 */

package com.jycrm.presentation.components.table;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import org.apache.tapestry.contrib.table.model.ITableColumn;
import org.apache.tapestry.contrib.table.model.ITableColumnModel;

public class AbstractColumnModel implements ITableColumnModel{
    protected List columns = new ArrayList();
    
    public int getColumnCount() {
        return this.columns.size();
    }

    public ITableColumn getColumn(String strName) {
        int i = Integer.parseInt(strName);
        return (ITableColumn) columns.get(i);
    }
  
    
    // Quick and dirty iterator
    public Iterator getColumns() {
        return columns.iterator();
    } 
}
